package com.example.smartclassroom.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.time.LocalDate;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
@TableName("course")
public class Course {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;   //课程Id
    private String courseName; //课程名称
    private String type; //课程类型
    private Integer teacherId;  //教师Id
    private Integer score;  //课程学分
    private Integer num;   //课程人数
    private Integer joinNum;   //已选人数
    private Integer roomId;   //上课教室Id
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startTime; //课程开始时间 例：2024-07-01
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endTime;  //课程结束时间 例：2024-08-04
    private String weekDay;  //上课时间  星期几
    private String segment;  // 上课时段  第几大节
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startTimeChoose; //设置开始选课时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endTimeChoose;  //设置结束选课时间

    @TableField(insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private String teacherName;
    @TableField(insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private String roomName;
    @TableField(insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private Integer offset;
    @TableField(insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private Integer pageSize;
}
